package com.xiaoqi.store.service;

import com.xiaoqi.store.entity.UserEntity;

/**
 * @Author Rookie Coder
 * @Description 用户业务类
 * @Date
 **/
public interface UserService {

    /*
    * @Author xiaoqi
    * @Description  注册用户
    * @return true 或 false
    **/
    boolean regUser(UserEntity userEntity);


    /*
    * @Author xiaoqi
    * @Description  ajax-检查用户名是否重复
    * @return
    **/
    boolean checkUserName(String username);

    /*
    * @Author xiaoqi
    * @Description  用户登录
    * @return true 或 false
    **/
    UserEntity userLogin(String username, String password);

    /*
    * @Author xiaoqi
    * @Description  修改用户名密码
    * @return void
    **/
    void updateUserPassword(Integer uid,String username,String oldPassword, String newPassword);

    /*
    * @Author xiaoqi
    * @Description  根据用户名查找用户信息
    * @return User
    **/
    UserEntity selectUserByUid(Integer uidFromSession);

    /*
    * @Author xiaoqi
    * @Description  修改用户信息
    * @return
    **/
    void changeUserInfo(Integer gender,String usernameFromSession, String phone, String email);

    /*
    * @Author xiaoqi
    * @Description  更新用户图像
    * @return
    **/
    void uploadUserAvator(Integer uid,String avatarPath);
}
